#include <Keyboard.h>
void setup() {
Keyboard.begin();
delay(5000); 
Keyboard.press(KEY_LEFT_GUI); 
delay(500); 
Keyboard.press('r'); //按住R键
delay(500); 
Keyboard.release(KEY_LEFT_GUI); 
Keyboard.release('r'); 
delay(300); 
Keyboard.press(KEY_LEFT_SHIFT); 
delay(200); 
Keyboard.release(KEY_LEFT_SHIFT); 
Keyboard.print("shutdown -p"); 
delay(200); //延时200ms（0.2s）
Keyboard.press(KEY_RETURN); 
Keyboard.release(KEY_RETURN); 
//二次按下
delay(200); //延时200ms（0.2s）
Keyboard.press(KEY_RETURN); 
Keyboard.release(KEY_RETURN); 
Keyboard.end();
}

void loop() {
}
